<div class="container-fluid">
<!-- BEGIN PAGE HEADER-->
<div class="row-fluid">
    <div class="span12">
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title">
            Quản lý Tin tức
        </h3>
        <ul class="breadcrumb">
            <li>
                <i class="icon-home"></i>
                <a href="index.html">Trang chủ</a>
                <i class="icon-angle-right"></i>
            </li>
            <li>
                <a href="#">Tin tức</a>
                <i class="icon-angle-right"></i>
            </li>
            <li><a href="#">Thêm mới tin tức</a></li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB-->
    </div>
</div>
<!-- END PAGE HEADER-->

    <!-- BEGIN PAGE CONTENT-->
    <div class="row-fluid">
        <div class="span12">
            <!-- BEGIN EXAMPLE TABLE PORTLET-->
            <div class="portlet box light-grey">
                <div class="portlet-title">
                    <h4><i class="icon-plus-sign"></i>Thêm mới bài viết</h4>
                    <div class="tools">
                        <a href="javascript:;" class="collapse"></a>
                    </div>
                </div>
                <div class="portlet-body form">
                    <!-- BEGIN FORM-->
                    <?php $form=$this->beginWidget('CActiveForm', array(
                        'id'=>'news-form',
                        'action'=> '/admin/news/create',
                        'htmlOptions' => array('class'=>'horizontal-form', 'enctype' => 'multipart/form-data'),
                        'enableAjaxValidation'=>false
                    ));
                    CHtml::$errorContainerTag = 'span';
                    ?>
                        <div class="row-fluid">
                            <div class="span6 ">
                                <div class="control-group <?php if ($form->error($model,'title') != "") echo "error"; ?>">
                                    <label class="control-label" for="News_title">Tiêu đề</label>
                                    <div class="controls">
                                        <?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>255, 'class'=>'m-wrap span12')); ?>
                                        <?php echo $form->error($model,'title', array('class'=>'help-block')); ?>
                                    </div>
                                </div>
                            </div>
                            <!--/span-->
                            <div class="span6 ">
                                <div class="control-group">
                                    <label class="control-label">Hiển thị</label>
                                    <div class="controls">
                                        <label class="radio">
                                            <div class="radio" id="uniform-undefined1"><span class=""><input name="News[status]" type="radio" checked="" value="0" id="News_status" style="opacity: 0;"></span></div>
                                            Có
                                        </label>
                                        <label class="radio">
                                            <div class="radio" id="uniform-undefined2"><span class=""><input type="radio" value="1"  name="News[status]" id="News_status" style="opacity: 0;"></span></div>
                                            Không
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <!--/span-->
                        </div>
                        <!--/row-->

                        <div class="row-fluid">
                            <div class="span2">Ảnh thumb:</div>
                            <div class="span10"><?php echo $form->fileField($model, 'image'); ?>
                                <?php echo $form->error($model,'image', array('errorCssClass'=>'error')); ?>
                            </div>
                        </div>
                        <?php if($model->isNewRecord!='1'){ ?>
                        <div class="row-fluid">
                            <?php echo CHtml::image(Yii::app()->request->baseUrl.'/data/images/img-news/'.$model->image,"image",array("width"=>150)); ?>
                        </div>
                        <?php }?>
                        <div class="row-fluid">
                            <div class="span12">
                                <div class="control-group <?php if ($form->error($model,'description') != "") echo "error"; ?>">
                                    <label class="control-label" >Mô tả ngắn</label>
                                    <div class="controls">
                                        <textarea style="width:50%" class="m-wrap" placeholder="Sử dụng text editor cho bai viet" name="News[description]" class="ckeditor"></textarea>
                                        <?php echo $form->error($model,'description', array('class'=>'help-block')); ?>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="row-fluid">
                            <div class="span12">
                                <div class="control-group <?php if ($form->error($model,'content') != "") echo "error"; ?>">
                                    <label class="control-label" >Bài viết</label>
                                    <div class="controls">
                                        <textarea style="width:98%" rows="3" class="m-wrap" placeholder="Sử dụng text editor cho bai viet" name="News[content]" id="ckeditor"></textarea>
                                        <?php echo $form->error($model,'content', array('class'=>'help-block')); ?>
                                    </div>
                                </div>
                            </div>

                            <!--/span-->
                        </div>
                        <!--/row-->

                        <div class="form-actions">
                            <button type="submit" class="btn blue"><i class="icon-ok"></i> Lưu</button>
                            <button type="button" class="btn" onclick="window.location='/admin/news/index'">Hủy</button>
                        </div>
                    <?php $this->endWidget(); ?>
                    <!-- END FORM-->
                </div>
            </div>
            <!-- END EXAMPLE TABLE PORTLET-->
        </div>
    </div>

    <!-- END PAGE CONTENT-->
</div>

<!-- END PAGE CONTENT-->
</div>